#
# Be sure to run `pod lib lint MirrorGoogleMobileAds.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

MirrorPath = "Mirror"

puts("#{MirrorPath}/GoogleMobileAds/Classes/**/*.{m,h}")


Pod::Spec.new do |s|
  s.name             = 'MirrorGoogleMobileAds'
  s.version          = '0.1.4'
  s.summary          = 'MirrorGoogleMobileAds can export the GoogleMobileAds to swift as a framework module.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: MirrorGoogleMobileAds can export the GoogleMobileAds to swift as a framework module.
                       DESC

  s.homepage         = 'https://gitee.com/tjerwinchen/mirror-google-mobile-ads-sdk'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'Theo Chen' => 'me@theochen.com' }
  s.source           = { :git => 'https://gitee.com/tjerwinchen/mirror-google-mobile-ads-sdk.git', :tag => 'GoogleMobileAds-' + s.version.to_s }
  # s.social_media_url = 'https://twitter.com/theochen'

  s.ios.deployment_target = '10.0'

  s.cocoapods_version = '>= 1.10.0'
  s.static_framework = false
  s.prefix_header_file = false

  s.source_files = "#{MirrorPath}/GoogleMobileAds/Classes/**/*.{m,h}"
  
  s.preserve_paths = [
    "#{MirrorPath}/GoogleMobileAds/README.md",
    "#{MirrorPath}/GoogleMobileAds/CHANGELOG.md"
  ]

  s.frameworks = [
    "AudioToolbox",
    "AVFoundation",
    "CFNetwork",
    "CoreGraphics",
    "CoreMedia",
    "CoreTelephony",
    "CoreVideo",
    "MediaPlayer",
    "MessageUI",
    "MobileCoreServices",
    "QuartzCore",
    "Security",
    "StoreKit",
    "SystemConfiguration",
    "JavaScriptCore"
  ]
  
  s.vendored_frameworks = "#{MirrorPath}/GoogleMobileAds/Frameworks/*"
  s.libraries  = 'sqlite3', 'z'
  
  s.dependency "GoogleAppMeasurement", "~> 7.0"
  s.dependency "GoogleUserMessagingPlatform", "~> 1.1"
  
  s.resource_bundles = {
    #'MirrorAlicloudSDK' => ["#{MirrorPath}/GoogleMobileAds/Assets/*.bundle"]
  }

  s.public_header_files = [
    "#{MirrorPath}/GoogleMobileAds/Classes/**/*.h",
  ]
  
  s.xcconfig = {
    'OTHER_LDFLAGS' => '-ObjC -all_load',
  }

  s.pod_target_xcconfig = {
    'OTHER_LDFLAGS' => '-ObjC -all_load',
    #'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
  }
  
#  valid_archs = ['armv7', 'armv7s', 'x86_64', 'arm64']
#  s.xcconfig = {
#    'VALID_ARCHS' =>  valid_archs.join(' ')
#  }

end
